using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._GeoAnalyticsDesktopTools._UseProximity
{
    /// <summary>
    /// <para>Trace Proximity Events</para>
    /// <para>Traces events near each other in space (location) and time. The time-enabled point data must include features that represent an instant in time.</para>
    /// <para>在空间（位置）和时间上跟踪彼此靠近的事件。启用时间的点数据必须包含表示时间瞬间的要素。</para>
    /// </summary>    
    [DisplayName("Trace Proximity Events")]
    public class TraceProximityEvents : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public TraceProximityEvents()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_points">
        /// <para>Input Points</para>
        /// <para>The time-enabled point feature class that will be used to trace proximity events.</para>
        /// <para>将用于追踪邻近事件的启用时间的点要素类。</para>
        /// </param>
        /// <param name="_entity_id_field">
        /// <para>Entity ID Field</para>
        /// <para>The field representing unique IDs for each entity.</para>
        /// <para>表示每个实体的唯一 ID 的字段。</para>
        /// </param>
        /// <param name="_out_feature_class">
        /// <para>Output Proximity Events</para>
        /// <para>The output feature class containing the trace proximity events.</para>
        /// <para>包含追踪邻近事件的输出要素类。</para>
        /// </param>
        /// <param name="_distance_method">
        /// <para>Distance Method</para>
        /// <para><xdoc>
        ///   <para>Specifies the distance type that will be used with the Spatial Search Distance parameter.</para>
        ///   <bulletList>
        ///     <bullet_item>Planar—Planar distance will be used between features. This is the default.</bullet_item><para/>
        ///     <bullet_item>Geodesic—Geodesic distance will be used between features. This line type takes into account the curvature of the spheroid and correctly deals with data near the dateline and poles.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将与空间搜索距离参数一起使用的距离类型。</para>
        ///   <bulletList>
        ///     <bullet_item>平面—要素之间将使用平面距离。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>测地线—要素之间将使用测地线距离。这种线类型考虑了椭球体的曲率，并正确处理了日期变更线和极点附近的数据。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        /// <param name="_spatial_search_distance">
        /// <para>Spatial Search Distance</para>
        /// <para>The maximum distance between two points to be considered in proximity. Features within the spatial search distance and temporal search distance criteria are considered to be in proximity of each other.</para>
        /// <para>在邻近时要考虑的两点之间的最大距离。空间搜索距离和时间搜索距离条件中的要素被视为彼此接近。</para>
        /// <para>单位： Feet | Yards | Miles | NauticalMiles | Meters | Kilometers </para>
        /// </param>
        /// <param name="_temporal_search_distance">
        /// <para>Temporal Search Distance</para>
        /// <para>The maximum duration between two points to be considered in proximity. Features within the temporal search distance and that meet the spatial search distance criteria are considered to be in proximity of each other.</para>
        /// <para>在邻近时要考虑的两点之间的最大持续时间。在时态搜索距离内且符合空间搜索距离条件的要素被视为彼此相邻。</para>
        /// </param>
        /// <param name="_entities_of_interest_input_type">
        /// <para>Define Entities of Interest Using</para>
        /// <para><xdoc>
        ///   <para>Specifies the entities of interest.</para>
        ///   <bulletList>
        ///     <bullet_item>Entities of Interest IDs—Entity names and times will be used as the entities of interest. This is the default.</bullet_item><para/>
        ///     <bullet_item>Selected features in a specified entity of interest layer—The selected feature in a specified entity of interest layer will be used as the entities of interest.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定感兴趣的实体。</para>
        ///   <bulletList>
        ///     <bullet_item>感兴趣的实体 ID - 实体名称和时间将用作感兴趣的实体。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>指定感兴趣图层中的所选要素 - 指定感兴趣图层中的所选要素将用作感兴趣图元。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        public TraceProximityEvents(object _in_points, object _entity_id_field, object _out_feature_class, _distance_method_value _distance_method, string? _spatial_search_distance, object _temporal_search_distance, _entities_of_interest_input_type_value _entities_of_interest_input_type)
        {
            this._in_points = _in_points;
            this._entity_id_field = _entity_id_field;
            this._out_feature_class = _out_feature_class;
            this._distance_method = _distance_method;
            this._spatial_search_distance = _spatial_search_distance;
            this._temporal_search_distance = _temporal_search_distance;
            this._entities_of_interest_input_type = _entities_of_interest_input_type;
        }
        public override string ToolboxName => "GeoAnalytics Desktop Tools";

        public override string ToolName => "Trace Proximity Events";

        public override string CallName => "gapro.TraceProximityEvents";

        public override List<string> AcceptEnvironments => ["extent", "outputCoordinateSystem", "workspace"];

        public override object[] ParameterInfo => [_in_points, _entity_id_field, _out_feature_class, _distance_method.GetGPValue(), _spatial_search_distance, _temporal_search_distance, _entities_of_interest_input_type.GetGPValue(), _entities_interest_ids, _entities_interest_layer, _out_tracks_layer, _max_trace_depth, _attribute_match_criteria];

        /// <summary>
        /// <para>Input Points</para>
        /// <para>The time-enabled point feature class that will be used to trace proximity events.</para>
        /// <para>将用于追踪邻近事件的启用时间的点要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Points")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_points { get; set; }


        /// <summary>
        /// <para>Entity ID Field</para>
        /// <para>The field representing unique IDs for each entity.</para>
        /// <para>表示每个实体的唯一 ID 的字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Entity ID Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _entity_id_field { get; set; }


        /// <summary>
        /// <para>Output Proximity Events</para>
        /// <para>The output feature class containing the trace proximity events.</para>
        /// <para>包含追踪邻近事件的输出要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Proximity Events")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_feature_class { get; set; }


        /// <summary>
        /// <para>Distance Method</para>
        /// <para><xdoc>
        ///   <para>Specifies the distance type that will be used with the Spatial Search Distance parameter.</para>
        ///   <bulletList>
        ///     <bullet_item>Planar—Planar distance will be used between features. This is the default.</bullet_item><para/>
        ///     <bullet_item>Geodesic—Geodesic distance will be used between features. This line type takes into account the curvature of the spheroid and correctly deals with data near the dateline and poles.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将与空间搜索距离参数一起使用的距离类型。</para>
        ///   <bulletList>
        ///     <bullet_item>平面—要素之间将使用平面距离。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>测地线—要素之间将使用测地线距离。这种线类型考虑了椭球体的曲率，并正确处理了日期变更线和极点附近的数据。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Distance Method")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _distance_method_value _distance_method { get; set; }

        public enum _distance_method_value
        {
            /// <summary>
            /// <para>Planar</para>
            /// <para>Planar—Planar distance will be used between features. This is the default.</para>
            /// <para>平面—要素之间将使用平面距离。这是默认设置。</para>
            /// </summary>
            [Description("Planar")]
            [GPEnumValue("PLANAR")]
            _PLANAR,

            /// <summary>
            /// <para>Geodesic</para>
            /// <para>Geodesic—Geodesic distance will be used between features. This line type takes into account the curvature of the spheroid and correctly deals with data near the dateline and poles.</para>
            /// <para>测地线—要素之间将使用测地线距离。这种线类型考虑了椭球体的曲率，并正确处理了日期变更线和极点附近的数据。</para>
            /// </summary>
            [Description("Geodesic")]
            [GPEnumValue("GEODESIC")]
            _GEODESIC,

        }

        /// <summary>
        /// <para>Spatial Search Distance</para>
        /// <para>The maximum distance between two points to be considered in proximity. Features within the spatial search distance and temporal search distance criteria are considered to be in proximity of each other.</para>
        /// <para>在邻近时要考虑的两点之间的最大距离。空间搜索距离和时间搜索距离条件中的要素被视为彼此接近。</para>
        /// <para>单位： Feet | Yards | Miles | NauticalMiles | Meters | Kilometers </para>
        /// </summary>
        [DisplayName("Spatial Search Distance")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public string? _spatial_search_distance { get; set; }


        /// <summary>
        /// <para>Temporal Search Distance</para>
        /// <para>The maximum duration between two points to be considered in proximity. Features within the temporal search distance and that meet the spatial search distance criteria are considered to be in proximity of each other.</para>
        /// <para>在邻近时要考虑的两点之间的最大持续时间。在时态搜索距离内且符合空间搜索距离条件的要素被视为彼此相邻。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Temporal Search Distance")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _temporal_search_distance { get; set; }


        /// <summary>
        /// <para>Define Entities of Interest Using</para>
        /// <para><xdoc>
        ///   <para>Specifies the entities of interest.</para>
        ///   <bulletList>
        ///     <bullet_item>Entities of Interest IDs—Entity names and times will be used as the entities of interest. This is the default.</bullet_item><para/>
        ///     <bullet_item>Selected features in a specified entity of interest layer—The selected feature in a specified entity of interest layer will be used as the entities of interest.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定感兴趣的实体。</para>
        ///   <bulletList>
        ///     <bullet_item>感兴趣的实体 ID - 实体名称和时间将用作感兴趣的实体。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>指定感兴趣图层中的所选要素 - 指定感兴趣图层中的所选要素将用作感兴趣图元。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Define Entities of Interest Using")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _entities_of_interest_input_type_value _entities_of_interest_input_type { get; set; }

        public enum _entities_of_interest_input_type_value
        {
            /// <summary>
            /// <para>Entities of Interest IDs</para>
            /// <para>Entities of Interest IDs—Entity names and times will be used as the entities of interest. This is the default.</para>
            /// <para>感兴趣的实体 ID - 实体名称和时间将用作感兴趣的实体。这是默认设置。</para>
            /// </summary>
            [Description("Entities of Interest IDs")]
            [GPEnumValue("ID_START_TIME")]
            _ID_START_TIME,

            /// <summary>
            /// <para>Selected features in a specified entity of interest layer</para>
            /// <para>Selected features in a specified entity of interest layer—The selected feature in a specified entity of interest layer will be used as the entities of interest.</para>
            /// <para>指定感兴趣图层中的所选要素 - 指定感兴趣图层中的所选要素将用作感兴趣图元。</para>
            /// </summary>
            [Description("Selected features in a specified entity of interest layer")]
            [GPEnumValue("SELECTED_FEATURE")]
            _SELECTED_FEATURE,

        }

        /// <summary>
        /// <para>Entities of Interest IDs</para>
        /// <para><xdoc>
        ///   <para>The entity names and start times for the entities of interest. This parameter is supported only when Entities of Interest IDs is specified for the Define Entities of Interest Using parameter.</para>
        ///   <para>
        ///     <bulletList>
        ///       <bullet_item>Entity ID—A unique entity name. The names are case sensitive.</bullet_item><para/>
        ///       <bullet_item>Starting From—An optional starting time to trace an entity of interest. If a time is not specified, January 1, 1970, will be used.</bullet_item><para/>
        ///     </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>感兴趣的实体的实体名称和开始时间。仅当为“定义感兴趣的实体”参数指定了感兴趣的实体 ID 时，才支持此参数。</para>
        ///   <para>
        ///     <bulletList>
        ///       <bullet_item>实体 ID - 唯一的实体名称。这些名称区分大小写。</bullet_item><para/>
        ///       <bullet_item>起始时间 - 用于追踪感兴趣实体的可选起始时间。如果未指定时间，则将使用 1970 年 1 月 1 日。</bullet_item><para/>
        ///     </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Entities of Interest IDs")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _entities_interest_ids { get; set; } = null;


        /// <summary>
        /// <para>Entities of Interest Layer</para>
        /// <para>The layer or table that contains the entities of interest. This parameter is supported only when Selected features in a specified entity of interest layer is specified for the Define Entities of Interest Using parameter.</para>
        /// <para>包含相关图元的图层或表。仅当为定义感兴趣的实体参数指定了指定感兴趣图层中的所选要素时，才支持此参数。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Entities of Interest Layer")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _entities_interest_layer { get; set; } = null;


        /// <summary>
        /// <para>Output Tracks</para>
        /// <para>An output layer containing the first trace event and all subsequent features for that specified entity.</para>
        /// <para>包含该指定实体的第一个追踪事件和所有后续要素的输出图层。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Tracks")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _out_tracks_layer { get; set; } = null;


        /// <summary>
        /// <para>Maximum Trace Depth</para>
        /// <para>The maximum degrees of separation between an entity of interest and an entity farther down the trace (downstream).</para>
        /// <para>感兴趣的实体与迹线下游（下游）的实体之间的最大分离度。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Maximum Trace Depth")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long? _max_trace_depth { get; set; } = null;


        /// <summary>
        /// <para>Attribute Match Criteria</para>
        /// <para>The fields used to constrain the proximity event.</para>
        /// <para>用于约束邻近事件的字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Attribute Match Criteria")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _attribute_match_criteria { get; set; } = null;


        public TraceProximityEvents SetEnv(object extent = null, object outputCoordinateSystem = null, object workspace = null)
        {
            base.SetEnv(extent: extent, outputCoordinateSystem: outputCoordinateSystem, workspace: workspace);
            return this;
        }

    }

}